Skip to content

Conversation

@kartykp
Copy link
Contributor

@kartykp kartykp commented May 20, 2025

Potential fix for https://github.com/npm/pg-db-session/security/code-scanning/1

To fix the issue, we will add a permissions block at the root of the workflow to explicitly define the required permissions. Based on the workflow's functionality, it needs contents: read to access repository contents and packages: write to publish the npm package. These permissions are sufficient for the tasks performed in the workflow.

The permissions block will be added at the root level, applying to all jobs in the workflow. This ensures that no unnecessary permissions are granted to the GITHUB_TOKEN.


Ref: https://github.com/github/npm/issues/13757

Suggested fixes powered by Copilot Autofix. Review carefully before merging.

…n permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@kartykp kartykp changed the title Potential fix for code scanning alert no. 1: Workflow does not contain permissions Potential fix for code scanning alert in pg-db-session Workflow May 20, 2025
@kartykp kartykp self-assigned this May 20, 2025
@kartykp kartykp requested a review from nishantms May 26, 2025 18:43
@kartykp kartykp marked this pull request as ready for review May 26, 2025 18:43
@kartykp kartykp merged commit 806c5c0 into master May 27, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants